package com.AAA.service.Impl.sas;

import com.AAA.entity.mht.TMhtRecordDedtail;
import com.AAA.entity.sas.TSasRecordDedtail;
import com.AAA.service.sas.TSasRecordDedtailService;
import com.AAA.dao.sas.ITSasRecordDedtailMapper;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (TSasRecordDedtail)表服务实现类
 *
 * @author 何泽明
 * @since 2022-11-01 14:15:49
 */
@Service
public class TSasRecordDedtailServiceImpl implements TSasRecordDedtailService {
   @Autowired
   private ITSasRecordDedtailMapper mapper;

   @Override
   public boolean insertBatch(List<TSasRecordDedtail> details) {
      int i=0;
      for (TSasRecordDedtail detail : details) {
         i+=mapper.insert(detail);
      }
      return details.size()==i;
   }

   @Override
   public boolean selectByTid(Integer tid) {
      TSasRecordDedtail tSasRecordDedtail = new TSasRecordDedtail();
      tSasRecordDedtail.setSasno(tid);
      List<TSasRecordDedtail> select = mapper.select(tSasRecordDedtail);
      if (select.size()>0){
         return true;
      }
      return false;
   }
}

